import { Column, Entity } from 'typeorm';
import { BaseEntity } from '../../../common/baseEntity/index';

@Entity('file')
export class File extends BaseEntity {
    @Column({ type: 'varchar', length: 255, comment: '文件名称' })
      name: string;
    
      @Column({ type: 'varchar', length: 255, comment: '文件原名称' })
      originalname: string;
    
      @Column({ type: 'varchar', length: 255, nullable: true, comment: '文件哈希值' })
      hash: string;
    
      @Column({ type: 'varchar', length: 250, comment: '文件大小' })
      size: string;
    
      @Column({ type: 'varchar', length: 250, comment: '文件路径' })
      url: string;
    
      @Column({ type: 'varchar', length: 50, nullable: true, comment: 'MIME' })
      mime: string;
    
      @Column({ type: 'tinyint', nullable: true, comment: '文件状态', default: 1 })
      status: number;
}
